﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test2
{
    class Program
    {
        static void Main(string[] args)
        {
            double sumArea = 0;
            Random rd = new Random();
            for (int i = 0; i < 10; ++i)
            {
                double tempArea = ShapeFactor.getShape(rd.Next(1, 5)).getArea();
                Console.WriteLine($"随机产生的形状面积为:{tempArea}");
                sumArea += tempArea;
            }
            Console.WriteLine($"面积总和为:{sumArea}");
            Console.ReadKey();
        }
    }
}
